package searchteam.client.ui.widgets;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class InfoPopUp extends DialogBox {
	
	public InfoPopUp(String text, String titre) {
		VerticalPanel panel = new VerticalPanel();
		
		this.setTitle(titre);
		this.setText(titre);
		this.setPopupPosition(100, 100);
		
		panel.add(new Label(text));
		
		Button b = new Button("OK");
		b.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				InfoPopUp.this.hide();
			}
		});
		panel.add(b);
		this.add(panel);
		this.show();
	}

}
